package com.xjtu.chapter06;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @author yjq
 * @version 1.0
 * @date 2021/8/18 16:54
 */
public class TestException_4 {
    public static int cat(int x) throws ArithmeticException{
        int z = 10/x;
        return z;
    }

    public static void main(String[] args) {
        int x;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        try {
            x = Integer.parseInt(in.readLine());
            cat(x);
        }catch (IOException e){
            System.out.println("read error");
        }catch (ArithmeticException e){
            System.out.println("devided by zero");
        }
    }
}
